Open Virtual Account
POST /api/v1/VirtualAccounts/open
Description
This endpoint allows creating a new virtual account.
Headers:
- No specific headers are required.
Path Parameters:
version: The version of the API.
Request Body:
CreateVirtualAccountRequest: The request body schema for creating a virtual account.
URL:
- POST:
/api/v1/VirtualAccounts/open
Response:
- 200: Success, returns the created virtual account details.
Error Codes:
-
400: Bad request, the request is not valid.
-
404: Not found, the specified virtual account does not exist.
-
500: Internal server error, something went wrong while processing the request.
Example Request Body:
HTTP/1.1 200 OK
{
"name": "VirtualAccount1",
"customerId": "1234567890",
"accountId": "0987654321"
}
Example Response:
HTTP/1.1 200 OK
{
"id": "123",
"name": "VirtualAccount1",
"customerId": "1234567890",
"accountId": "0987654321",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
}
Notes:
-
This endpoint is useful for creating a new virtual account.
-
The request body includes the virtual account's name, customer ID, and account ID.
-
The response includes the created virtual account's details including ID, name, customer ID, account ID, and creation/update timestamps.
Method: POST
/api/v1/VirtualAccounts/open
Headers
| Content-Type | Value |
|---|---|
Content-Type | application/json |
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Body (raw)
{
"accountProvider": 2,
"accountReference": "<string>",
"currency": "<string>",
"customerEmail": "<string>",
"customerName": "<string>",
"bvn": "<string>"
}
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"id": "<uuid>",
"merchantId": "<uuid>",
"accountName": "<string>",
"accountNumber": "<string>",
"bankName": "<string>",
"email": "<string>",
"currency": "<string>",
"accountReference": "<string>",
"bvn": "<string>",
"lastActivity": "<dateTime>",
"availableBalance": "<double>",
"walletID": "<string>",
"status": "<string>"
}
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/VirtualAccounts/open \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!